#region

using System.Collections.Generic;
using System.Linq;
using ThuySan.Bussiness;

#endregion

namespace ThuySan.Repository
{
    public partial class WebUserRepository
    {
        #region IWebUserRepository Members

        public bool CheckInsertWebUser(WebUser webUser)
        {
            return !DataContext.WebUsers.Any(c => c.UserName == webUser.UserName || c.Email == webUser.Email);
        }

        public bool CheckUpdateWebUser(WebUser webUser)
        {
            return !DataContext.WebUsers.Any(c => (c.UserName == webUser.UserName || c.Email == webUser.Email) && c.WebUserId != webUser.WebUserId);
        }

        public bool CheckDeleteWebUser(IEnumerable<int> list)
        {
            return true;
        }

        #endregion
    }
}
